Skip to content

fix(finai): stabilize assistant tools and pagination - #289

Open
NeerajCodz wants to merge 4 commits into
mainfrom
fix/finai-tools-issues
Open

NeerajCodz wants to merge 4 commits into
mainfrom
fix/finai-tools-issues

Conversation

@NeerajCodz

Copy link
Copy Markdown
Owner

Changes

  • Harden FinAI assistant streaming, tool arguments, action execution, and trash pagination.

Issues

Fixes #194
Fixes #242
Fixes #243
Fixes #244
Fixes #245
Fixes #246
Fixes #247
Fixes #248
Fixes #249
Fixes #250
Fixes #252
Fixes #253
Fixes #254
Fixes #255
Fixes #271

- Fix assistant stream, search, manage-action, and trash pagination regressions.
- Fixes #194, #242, #243, #244, #245, #246, #247, #248, #249, #250, #252, #253, #254, #255, and #271.
@vercel

vercel Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
finapp Ready Ready Preview Nov 27, 2026 3:14am UTC

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-27T02:36:31.302844Z
We couldn’t complete this review. Comment @codex review to try again.
016337b Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@NeerajCodz

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2e31b4189b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread convex/ai/manageTools.ts Outdated
] as const);
if (type) {
payload.type = type;
const customType = str(args, 'customType', 40);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Accept custom-type-only account updates

When an existing other account only needs its custom label changed, a valid call containing accountId and customType never reaches this code because it is nested under if (type). The custom type is therefore omitted from the action payload and the tool reports NOTHING_TO_CHANGE; process customType independently while validating that the effective account type is other.

Useful? React with 👍 / 👎.

Comment thread tests/convex/trash.test.ts Outdated
cursor = nextCursor ?? undefined;
}
expect(nextCursor).toBeNull();
expect(seen).toHaveLength(count);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Assert the Set's size instead of its length

Whenever this new pagination test runs, seen is a Set, which has a size property but no length; Vitest's toHaveLength matcher therefore fails regardless of whether pagination returned all 225 records. Assert seen.size instead so the test validates the implementation rather than unconditionally breaking the suite.

Useful? React with 👍 / 👎.

Comment thread apps/web/lib/finai/useFinaiActivity.ts Outdated
Comment on lines 22 to 24
if (!activity) {
seenReplyIds.current = null;
return;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve seen replies across transient disconnects

When the web client briefly loses its WebSocket connection, FinaiLauncher passes enabled=false, the query becomes undefined, and this reset discards every previously seen reply ID. If a background reply finishes during that outage, the reconnect snapshot is treated as initial state and seeds the new ID without calling onReply, so the user never receives the promised notification for a reply completed after mount. Preserve the set across temporary query unavailability and reset it only when the user session actually changes.

Useful? React with 👍 / 👎.

- Skip an undefined row returned from indexed search pagination without passing it to consumers.
@NeerajCodz

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

- Import the stream writer and assert removed Convex fields as absent.
- Handle custom-type-only account updates and retain reply tracking across reconnects.
- Correct the paginated trash test assertion.

This branch was successfully deployed

1 active deployment
Preview — c5a2002c Deployed Nov 27, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment